Population statistics plots#
try to do some statistics on smarter samples
import pandas as pd
from lets_plot import *
LetsPlot.setup_html()
import os
os.getcwd()
'/home/core/TSKITetude/docs/notebooks'
Define which chromosome to be plotted and the breed of interest. Also determine a second breed for comparisons. chr argument should be numeric
# import sys
# args = sys.argv
# chr=args[1]
# pop1=args[2]
# pop2=args[3]
# these are exmaple values. Must be changed!!!!
# 'LAT', 'CHR'
chr = 1
pop1 = 'LAT'
pop2 = 'CHR'
tajima = pd.DataFrame()
for chromosome in range(1, 2):
tmp = pd.read_csv("WindowedTajima_" + str(chromosome) + ".csv")
tmp.loc[:, "Chr"] = chromosome
tajima = pd.concat([tajima, tmp])
plot = ggplot(data = tajima) + geom_line(aes(x = "Breakpoint", y = "TajimaD")) + \
facet_wrap(facets = ["Chr", "Breed"], scales = "free") + ggtitle("TajimaD, remapped")
plot